package com.gzu.se.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;

@Data
@TableName("products")
public class Product {
    @TableId
    @JsonFormat(shape = JsonFormat.Shape.STRING) // 序列化为字符串
    private Long id;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long farmerId;

    private  String name;
    private String description;
    private BigDecimal price;
    private Integer stock;

}
